package org.codeart.factory.scheme02.controller;

import org.codeart.factory.scheme02.factory.FreeGoodsFactory;
import org.codeart.factory.scheme02.pojo.AwardInfo;
import org.codeart.factory.scheme02.pojo.ResponseInfo;
import org.codeart.factory.scheme02.service.IFreeGoods;

import java.util.Map;

public class DeliverController {

    public ResponseInfo deliverAward(AwardInfo awardInfo) {
        Map<String, String> extraInfo = awardInfo.getExtraInfo();
        IFreeGoods goods = FreeGoodsFactory.produceFreeGoods(awardInfo.getAwardType());
        return goods.sendFreeGoods(awardInfo);
    }

}
